import json

def main1(arg1: str) -> int:
    data = json.loads(arg1)
    return data.get("data", {}).get("totalSize", 0)
def main2(arg1: str) -> dict:
    data = json.loads(arg1)
    return {"totalSize": data.get("data", {}).get("totalSize", 0)}

print(main1("{\"data\":{\"totalSize\":100}}"))
print(main2("{\"data\":{\"totalSize\":100}}"))